package com.zzyweb.rentalcarsys.controller;

import cn.hutool.core.util.IdUtil;
import com.zzyweb.rentalcarsys.service.CaptchaService;
import com.zzyweb.rentalcarsys.utils.ResponseObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author zhiyi
 * @date 9/29/25
 **/
@RestController
@RequestMapping("/captcha")
@CrossOrigin
public class CaptchaController {
    @Autowired
    CaptchaService captchaService;
    @GetMapping("/get")
    public ResponseObject getImageCaptcha(String captchaId) {
        return ResponseObject.ok(captchaService.createImgCaptcha(captchaId));
    }

}
